package me.guowenlong.lazyfragment

import android.support.v4.app.Fragment

/**
 *
 * 类的描述
 *
 * @author guowenlong
 * 创建时间:2018-11-24-18:23
 *
 */
class LazyFragment : Fragment() {
    var isFirst = false
    override fun onResume() {
        super.onResume()
        isFirst = true
    }

    override fun setUserVisibleHint(isVisibleToUser: Boolean) {
        if (isVisibleToUser && !isFirst) {
            loadData()
        }
        super.setUserVisibleHint(isVisibleToUser)

    }

    private fun loadData() {

    }
}